﻿using Kavaa.Modules.PortailMedical.Entity;
using Kavaa.Modules.PortailMedical.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;

namespace Kavaa.Modules.PortailMedical.Proxy
{
    public class CabinetClient : ClientBase<ICabinet>, ICabinet
    {
    /// <summary>
        /// Constructeur
        /// </summary>
        public CabinetClient() { }

        /// <summary>
        /// Constructeur
        /// </summary>
        public CabinetClient(string endpointConfigurationName) :
            base(endpointConfigurationName) { }

        /// <summary>
        /// Constructeur
        /// </summary>
        public CabinetClient(string endpointConfigurationName, string remoteAddress) :
            base(endpointConfigurationName, remoteAddress) { }

        /// <summary>
        /// Constructeur
        /// </summary>
        public CabinetClient(string endpointConfigurationName, EndpointAddress remoteAddress) :
            base(endpointConfigurationName, remoteAddress) { }

        /// <summary>
        /// Constructeur
        /// </summary>
        public CabinetClient(Binding binding, EndpointAddress remoteAddress) :
            base(binding, remoteAddress) { }


        public Cliniques DecouvrirCliniques(int acteId, int villeId, int userId)
        {
            return base.Channel.DecouvrirCliniques(acteId, villeId, userId);
        }

        public void AddAccreditation(int MedecinId, int CliniqueId, int ActeId)
        {
            base.Channel.AddAccreditation(MedecinId, CliniqueId, ActeId);

        }
        public Accreditations GetAccreditationsEnCoursByUser(int userId)
        {
            return base.Channel.GetAccreditationsEnCoursByUser(userId);
        }
        public Accreditations GetAccreditationsAccordeesByUser(int userId)
        {
            return base.Channel.GetAccreditationsAccordeesByUser(userId);
        }
        public Accreditations GetAccreditationsRefuseesByUser(int userId)
        {
            return base.Channel.GetAccreditationsRefuseesByUser(userId);
        }

        public Cliniques DecouvrirCliniquesAccredit(int acteId, int userId)
        {
            return base.Channel.DecouvrirCliniquesAccredit(acteId, userId);
        }
        public Reservations GetReservbloquees(int CliniqueId, int acteId)
        {
            return base.Channel.GetReservbloquees(CliniqueId, acteId);
        }
        public int SaveReservation(int id, DateTime DateDebut, DateTime DateFin, int ActeId, int CliniqueId, int MedecinId, String body)
        {
            return base.Channel.SaveReservation(id, DateDebut, DateFin, ActeId, CliniqueId, MedecinId, body);
        }
        public Categories GetBlocsDispo(DateTime DateDebut, DateTime DateFin, int CliniqueId, int acteId)
        {
            return base.Channel.GetBlocsDispo(DateDebut, DateFin, CliniqueId, acteId);
        }
        public Boolean IsMedecinFree(DateTime DateDebut, DateTime DateFin, int IdMedecin)
        {
            return base.Channel.IsMedecinFree(DateDebut, DateFin, IdMedecin);
        }
        public void AddReservCategorie(int ReservId, int BlocId)
        {
            base.Channel.AddReservCategorie(ReservId, BlocId);
        }
        public Reservations GetReservMedecin(int IdMedecin)
        {
            return base.Channel.GetReservMedecin(IdMedecin);
        }
        public void UpdateReservation(DateTime DateDebut, DateTime DateFin, int ActeId, int CliniqueId, int MedecinId, String body, int id)
        {
            base.Channel.UpdateReservation(DateDebut, DateFin, ActeId, CliniqueId, MedecinId, body, id);
        }
        public Boolean existReserv(int id_reserv)
        {
            return base.Channel.existReserv(id_reserv);
        }
        public int GetLastIndexReserv()
        {
            return base.Channel.GetLastIndexReserv();
        }
        public void DeleteReserv(int reservId)
        { base.Channel.DeleteReserv(reservId); }
        public Proprietes GetProprietesCategorie(int id_categorie)
        {
            return base.Channel.GetProprietesCategorie(id_categorie);
        }

        public Reservations GetReservMedecinEnCours(int IdMedecin)
        {
            return base.Channel.GetReservMedecinEnCours(IdMedecin);
        }

        public Reservations GetReservMedecinAccordees(int IdMedecin)
        {
            return base.Channel.GetReservMedecinAccordees(IdMedecin);
        }

        public Reservations GetReservMedecinRefusees(int IdMedecin)
        {
            return base.Channel.GetReservMedecinRefusees(IdMedecin);
        }
        public void UpdateReservConfirmee(int idReserv, int idPatient, string RemarquesPatient)

         {
          base.Channel.UpdateReservConfirmee(idReserv,idPatient,RemarquesPatient);
        }

        public int AddPatient(Patient patient)

         {
           return base.Channel.AddPatient(patient);
        }
        public Reservation GetInfoConvocation(int ReservId)
        { 
          return base.Channel.GetInfoConvocation(ReservId);
        }

    }
}
